package com.yc.system.mapper;

import com.yc.system.entity.BookType;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Set;

/**
 * <p>
 * 图书分类 Mapper 接口
 * </p>
 *
 * @author 1850140986@qq.com
 * @since 2022-12-03
 */
@Mapper
public interface BookTypeMapper extends BaseMapper<BookType> {

    @Select("select * from t_book_type where type_id<20")
    List<BookType> getAllFirstBookType();

    @Select("select * from t_book_type where type_id>20")
    List<BookType> getAllSecondBookType();

    @Select("select P_id from t_book_type where type_id=#{typeId}")
    int getTypePIdbyTypeId(Integer typeId);
    @Select("select * from t_book_type where type_id=#{typeId}")
    BookType selectOneById(String id);
}
